package com.smartens.boit.base;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.smartens.boit.R;
import com.smartens.boit.util.AppManager;


public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        AppManager.getAppManager().addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        //将Activity实例从AppManager的堆栈中移除
        AppManager.getAppManager().finishActivity(this);
    }

    /**
     * 初始化布局View
     */
    protected abstract void initView();

    /**
     * 初始化数据
     */
    protected abstract void initData();
}


